﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LoginPanel.ascx.cs" Inherits="GWA.Controls.LoginPanel" %>

<!-- Panel -->
<div id="toppanel">
	<div id="panel">
		<div class="content clearfix">
            <asp:LoginView ID="LoginView1" runat="server">
            <AnonymousTemplate>
                <div class="leftspace">
			        <div class="left">
				        <h1>Welcome to the Grind Project</h1>
				        <h2>Sub Title</h2>		
				        <p class="grey">Lorem Ipsum Text</p>
				        <h2>Secondary Title</h2>
				        <p class="grey">Secondary Text</a></p>
			        </div>
			        <div class="left">
				        <!-- Login Form -->
				        <form class="clearfix" action="#" method="post">
				            <h1>Member Login</h1>
                            <asp:Login RememberMeText="Remember Me" TitleText="" ID="Login1" runat="server"
                             OnAuthenticate="Login1_Authenticate" OnLoginError="Login1_Error">
                                <LayoutTemplate>
                                    <label class="grey" for="log">Username:</label>
                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                    <asp:TextBox CssClass="field" ID="UserName" runat="server"></asp:TextBox>
                                    <label class="grey" for="pwd">Password:</label>
					                &nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox CssClass="field" ID="Password" TextMode="Password" runat="server"></asp:TextBox>
                                    <label><asp:CheckBox ID="chkRememberMe" Checked="false" runat="server" /> &nbsp;Remember me</label>
                                    &nbsp;&nbsp;&nbsp;&nbsp;<div class="clear"></div>
                                    <asp:Button CssClass="bt_login" CommandName="Login" ID="Login" runat="server" Text="Login" />
                                    <div class="clear"></div>
                                    <span style="color:Red;"><asp:Literal id="FailureText" runat="server"></asp:Literal></span>
                                </LayoutTemplate>
                            </asp:Login>
				        </form>
			        </div>
			        <div class="left right">			
				        <!-- Register Form -->
				        <h1>Not a member yet? Sign Up!</h1>				
				        <label class="grey" for="signup">Username:</label>
                        <asp:TextBox ID="txtRegName" runat="server" CssClass="field"></asp:TextBox>
				        <label class="grey" for="email">Email:</label>
                        <asp:TextBox ID="txtRegEmail" runat="server" CssClass="field"></asp:TextBox>
				        <label>Click register to continue</label>
                        <asp:Button ID="btnRegister" runat="server" Text="Register" 
                            CssClass="bt_register" onclick="btnRegister_Click" />
			        </div>
		        </div>
		    </div>
		    </AnonymousTemplate>
		    <LoggedInTemplate>
		    <div class="leftspace">
		        <div class="left">
				        <h1>Welcome to the Grind Project</h1>
				        <h2>Sub Title</h2>		
				        <p class="grey">Lorem Ipsum Text</p>
				        <h2>Secondary Title</h2>
				        <p class="grey">Secondary Text</a></p>
			        </div>
			        <div class="left">
				        <!-- Login Form -->
				        <form class="clearfix" action="#" method="post">
				            <h1>You're a member!</h1>
				        </form>
			        </div>
			        <div class="left right">			
				        <!-- Register Form -->
				        <form action="#" method="post">
					        <h1>Your a member!</h1><br />
                        <asp:LoginStatus ID="LoginStatus1" runat="server" OnLoggedOut="LoginStatus1_LoggedOut" />
				        </form>
			        </div>
		        </div>
		    </div>
		    </LoggedInTemplate>
        </asp:LoginView>
	</div> <!-- /login -->	

    <!-- The tab on top -->	
	<div class="tab">
		<ul class="login">
            <asp:LoginView ID="LoginView2" runat="server">
                <AnonymousTemplate>
	    	        <li class="left">&nbsp;</li>
	                <li>Hello, Guest!</li>
			        <li class="sep">|</li>
			        <li id="toggle">
				        <a id="open" class="open" href="#">Log In | Register</a>
				        <a id="close" style="display: none;" class="close" href="#">Close Panel</a>			
			        </li>
	    	        <li class="right">&nbsp;</li>
	    	    </AnonymousTemplate>
	    	    <LoggedInTemplate>
	    	        <li class="left">&nbsp;</li>
	                <li><asp:Label ID="lblUsername" runat="server"></asp:Label> </li>
			        <li class="sep">|</li>
			        <li id="toggle">
				        <a id="open" class="open" href="#">Log Out | Edit Profile</a>
				        <a id="close" style="display: none;" class="close" href="#">Close Panel</a>			
			        </li>
	    	        <li class="right">&nbsp;</li>
	    	    </LoggedInTemplate>
	    	</asp:LoginView>
		</ul> 
	</div> <!-- / top -->
	
</div> <!--panel -->
